import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Item from '../views/Item.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    meta:{
      title:'API新闻网'
    },
    name: 'home',
    component: Home
  },
  {
    path: '/item/:id',
    meta:{
      title:'API新闻网'
    },
    name: 'item',
    component: Item
  }
]

const router = new VueRouter({
  routes
})

export default router
